package com.neusoft.neumooc.dao;

import java.util.List;
import java.util.Map;

import com.neusoft.core.common.exception.DAOException;
import com.neusoft.neumooc.vo.UserVO;

/**
 * @ClassName: UserDao
 * @Description: 用户管理数据操作接口
 * @author lusiyu
 * @date 2016年8月17日
 */
public interface UserDAO {
    
	/** 
	 * @Title: getUserByName 
	 * @Description:通过登录名获取用户
	 * @param userName
	 * @return Map<String,Object> 用户名
	 * @throws DAOException
	 */
	public Map<String,Object> getUserByName(String userName) throws DAOException;
	
	/** 
	 * @Title: queryUserNum 
	 * @Description:查询用户总数
	 * @return int 
	 * @throws DAOException
	 */
	public int queryUserNum() throws DAOException; 
	
	/** 
	 * @Title: getUsers 
	 * @Description:分页
	 * @param pageNo，pageSize
	 * @return List 用户信息
	 * @throws DAOException
	 */
	public List<UserVO> getUsers(int pageNo, int pageSize) throws DAOException;
	
	 /** 
	 * @Title: getUserInfo 
	 * @Description:通过id获取用户信息
	 * @param userId 用户id 
	 * @throws DAOException
	 */
	public UserVO getUserInfo(String userId) throws DAOException;
	
	/** 
	 * @Title: addUser 
	 * @Description:添加用户信息
	 * @param userVO 用户信息
	 * @return boolean
	 * @throws DAOException
	 */
	public boolean addUser(UserVO userVO) throws DAOException;
	 
	/** 
	 * @Title: getUser 
	 * @Description:通过id查询用户
	 * @param userId 用户id 
	 * @return Map<String,Object>
	 * @throws DAOException
	 */
	public Map<String,Object> getUser(String userId);
	
	/** 
	 * @Title: updateUser 
	 * @Description:更新用户信息
	 * @param  userVO 用户信息
	 * @return boolean
	 * @throws DAOException
	 */
	public boolean updateUser(UserVO userVO) throws DAOException;
	
	/** 
	 * @Title: updateStatusNo 
	 * @Description:启用
	 * @param  status 用户状态
	 * @return void 1
	 * @throws DAOException
	 */
	public void updateStatusOn(String status) throws DAOException;
	
	/** 
	 * @Title: updateStatusOff 
	 * @Description:停用
	 * @param  status 用户状态
	 * @return void 0
	 * @throws DAOException
	 */
	public void updateStatusOff(String status) throws DAOException;
	
	/** 
	 * @Title: deleteUser 
	 * @Description:通过id删除用户
	 * @param  userId 用户id
	 * @return int
	 * @throws DAOException
	 */
    public int deleteUser(String userId) throws DAOException;
    
}
